program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  a, b, c, i, m: integer;
begin
  readln(a);
  readln(b);
  readln(c);
  if (a<=b) and (a<=c) then
  begin
    m:= 1;
  end;
  if (b<=a) and (b<=c) then
  begin
    m:= 2;
  end;
  if (c<=b) and (c<=a) then
  begin
    m:= 3;
  end;
  if m=1 then
  begin
    for I := 1 to a do
    begin
      if a mod i = 0 then
      begin
        if b mod i = 0 then
        begin
          if c mod i = 0 then
          begin
            writeln (i);
          end;
        end;
      end;
    end;
  end;
    if m=2 then
  begin
    for I := 1 to b do
    begin
      if b mod i = 0 then
      begin
        if a mod i = 0 then
        begin
          if c mod i = 0 then
          begin
            writeln (i);
          end;
        end;
      end;
    end;
  end;
    if m=3 then
  begin
    for I := 1 to c do
    begin
      if c mod i = 0 then
      begin
        if a mod i = 0 then
        begin
          if b mod i = 0 then
          begin
            writeln (i);
          end;
        end;
      end;
    end;
  end;
  readln;
end.
